<?php
class Config_model extends CI_Model 
{

	public function __construct()
	{
		$this->load->database();
	}
	
	public function is_maintenance_mode()
	{
		$sql = "select * from config " .
			   "where param_name = 'SYSTEM_STATUS' " .
			   "and param_value = 'MAINTENANCE'";
		
		$query = $this->db->query($sql); 

		if($query->num_rows == 1)
		{
			return true;
		}
	}	
	
}
?>
